<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //条件判断
    let xhs =5,xg=1;
    if(xg>0){
        xhs=1;
    }
    console.log(xhs);
    // if(条件表达式){
    //     条件为真
    // }else{
    //     条件不为真
    // }
    //取两个值中的最大值
    let shu1=100,shu2=456,max;
    if(shu1>shu2){
         max=shu1;
    }else{
        max=shu2;
    }
    console.log('最大值是：',max);
    console.log('----------');
    let a=prompt();
    let b=prompt();
    let min;
    if(a>b){
     min=b
    }else if(a<b){
      min=a
    }else{
      console.log('a和b相等');
    }
    console.log('最小值是：',min);
</script>
</html>